﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using ReactiveUI.Fody.Helpers;

namespace Common.ViewModels
{
    /// <summary>
    /// 机械手 由他的基座和 动子构成 机械手应该安装在车上 机械手有自身的X Y Z 和世界坐标系合并
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class Robot:MoveBase
    {
        [Reactive] public string Name { get; set; }

        [Reactive] public double Speed { get; set; }

        /// <summary>
        /// 机器人臂展
        /// </summary>
        [Reactive] public double 臂展 { get; set; }

        [Reactive] public double 夹爪X { get; set; }

        [Reactive] public double 夹爪Y { get; set; }

        [Reactive] public double 夹爪Z { get; set; }


        //机械手末端同样存在X Y Z

        public void Move(Point3D p)
        {
            double distance = this.PointStart.GetDistance(p);


        }

        public bool GetCanMove(Point3D p)
        {
            double distance = this.PointStart.GetDistance(p);
            if (distance > 臂展)
            {
                return false;
            }
            else
            {
                return true;
            }

        }

    }
}
